package validator

// CreateDeviceValidate 创建设备验证器
type CreateDeviceValidate struct {
	Cpu          string `json:"cpu" binding:"required" msg:"CPU型号不能为空"`
	ImageUrl     string `json:"image_url"`
	Manufacturer string `json:"manufacturer"`
	ManSize      uint   `json:"man_size" binding:"required" msg:"人数规模不能为空"`
	Model        string `json:"model" binding:"required" msg:"设备型号不能为空"`
	Name         string `json:"name" binding:"required" msg:"设备名称不能为空"`
	Password     string `json:"password"`
	Platform     int16  `json:"platform" binding:"required,oneof=0 1" msg:"平台类型不正确"`
	Size         string `json:"size" binding:"required" msg:"屏幕分辨率不能为空"`
	UdId         string `json:"ud_id" binding:"required" msg:"设备唯一标识不能为空"`
	Version      string `json:"version" binding:"required" msg:"系统版本不能为空"`
	NickName     string `json:"nick_name" binding:"required" msg:"设备昵称不能为空"`
	IsHm         int16  `json:"is_hm" binding:"required,oneof=0 1" msg:"是否花木设备标识不正确"`
	Qrcode       string `json:"qrcode"`
	IsShow       int8   `json:"is_show" binding:"required,oneof=0 1" msg:"显示状态不正确"`
	Orders       int    `json:"orders"`
}

// UpdateDeviceValidate 更新设备验证器
type UpdateDeviceValidate struct {
	Id           uint   `json:"id" binding:"required" msg:"设备ID不能为空"`
	Cpu          string `json:"cpu" binding:"required" msg:"CPU型号不能为空"`
	ImageUrl     string `json:"image_url"`
	Manufacturer string `json:"manufacturer"`
	ManSize      uint   `json:"man_size" binding:"required" msg:"人数规模不能为空"`
	Model        string `json:"model" binding:"required" msg:"设备型号不能为空"`
	Name         string `json:"name" binding:"required" msg:"设备名称不能为空"`
	Password     string `json:"password"`
	Platform     int16  `json:"platform" binding:"required,oneof=0 1" msg:"平台类型不正确"`
	Size         string `json:"size" binding:"required" msg:"屏幕分辨率不能为空"`
	UdId         string `json:"ud_id" binding:"required" msg:"设备唯一标识不能为空"`
	Version      string `json:"version" binding:"required" msg:"系统版本不能为空"`
	NickName     string `json:"nick_name" binding:"required" msg:"设备昵称不能为空"`
	IsHm         int16  `json:"is_hm" binding:"required,oneof=0 1" msg:"是否花木设备标识不正确"`
	Qrcode       string `json:"qrcode"`
	IsShow       int8   `json:"is_show" binding:"required,oneof=0 1" msg:"显示状态不正确"`
	Orders       int    `json:"orders"`
}

// DeleteDeviceValidate 删除设备验证器
type DeleteDeviceValidate struct {
	Id uint `json:"id" binding:"required" msg:"设备ID不能为空"`
}
